package yiChang.ziDingyiyichang;

import jdk.jshell.spi.ExecutionControl;

public class login {
    private String userName="admin";
    private String password="123456";

    public static void loginfo(String userName,String password)
            throws UserNameException, passwordException {
        if (!userName.equals(userName)){
        throw new UserNameException("用户名错误");
        }
        if(!password.equals(password)){
        throw new passwordException("密码错误");
        }
        System.out.println("登录成功");
    }

}
